// Load all sprites from the /img/ directory
// directory
show_message("here1");
if (directory_exists(argument0))
{
    show_message("here2");
    file = file_find_first(argument0 + "/*.png", 0);
    while (file != "")
    {
        if (!isFileCached(file))
        {
            // Found a sprite file, now load it:
            spr = sprite_add(file, 0, false, false, 0, 0);
            r = instance_create(0,0,Resource);
            r.data = spr;
            r.path = file;
            ds_list_add(ResourceManager.resources, r);
            ds_list_add(ResourceManager.sprites, r);
            show_message("Added resource " + r.path + " with sprite " + r.data);
            ds_list_add(ResourceManager.cachedfiles, file);
        }
        file = file_find_next();
    }
}
